﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="MatchmakingPartner.cs" company="DissingNelleman">
//   
// All rights reserved. </copyright>
// <summary>
//   The matchmaking partner.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace ServiceLibrary.Models.Domain
{
    using NHibernate.Mapping.ByCode.Conformist;

    using ServiceLibrary.Models.Base;

    /// <summary>
    /// The matchmaking partner.
    /// </summary>
    public class MatchmakingPartner : Entity
    {
        #region Public Properties

        /// <summary>
        /// Gets or sets the other text.
        /// </summary>
        public virtual string OtherText { get; set; }

        /// <summary>
        /// Gets or sets the product development text.
        /// </summary>
        public virtual string ProductDevelopmentText { get; set; }

        /// <summary>
        /// Gets or sets the sales text.
        /// </summary>
        public virtual string SalesText { get; set; }

        /// <summary>
        /// Gets or sets the test text.
        /// </summary>
        public virtual string TestText { get; set; }

        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        public virtual MatchmakingPartnerType Type { get; set; }

        #endregion
    }

    /// <summary>
    /// The matchmaking partner mapping.
    /// </summary>
    public class MatchmakingPartnerMapping : ClassMapping<MatchmakingPartner>
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="MatchmakingPartnerMapping"/> class.
        /// </summary>
        public MatchmakingPartnerMapping()
        {
            this.ManyToOne(x => x.Type);
            this.Property(x => x.ProductDevelopmentText, m => m.Length(int.MaxValue / 2));
            this.Property(x => x.TestText, m => m.Length(int.MaxValue / 2));
            this.Property(x => x.SalesText, m => m.Length(int.MaxValue / 2));
            this.Property(x => x.OtherText, m => m.Length(int.MaxValue / 2));
        }

        #endregion
    }
}